<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
<script type="text/javascript">
function resetPassword() {
	var xmlhttp;
	if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	} else {// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4)	{
			var resultMsg = document.getElementById('resultMsg');
			resultMsg.innerHTML = "Email with directions sent to provided email address.";
		}
	};
	
	var resultMsg = document.getElementById('resultMsg');
	resultMsg.innerHTML = "";
	var emailAddress = document.getElementById('emailAddress');
	
	
	var path = "./resource/customer/password?emailAddress=" + emailAddress.value;
	xmlhttp.open("POST", path, true);
	xmlhttp.send();
}
</script>
</head>
<body>
  <table>
    <tr>
      <th align="right">Email Address:</th>
      <td align="left"><input type="text" id="emailAddress" name="emailAddress"/></td>
    </tr>
    <tr>
       <td align="left"><button id="reset" onclick="resetPassword()"> Reset </button> </td>
    </tr>
  </table>
  <p id="resultMsg"></p>
</body>
</html>